home *** CD-ROM | disk | FTP | other *** search
- Path: news-ath.forthnet.gr!usenet
- From: thimm@onned.gr (Herbert Thimm)
- Newsgroups: comp.lang.c++,comp.lnag.c++.moderated
- Subject: Re: cached output in c++
- Date: Tue, 09 Jan 1996 02:40:22 GMT
- Organization: Foundation for Research and Technology Hellas, FORTHnet
- Message-ID: <4cskd9$duv@brigitte.forthnet.gr>
- References: <4boulr$qiu@brigitte.forthnet.gr> <4chcgk$ldg@gold.datalytics.com>
- Reply-To: thimm@onned.gr
- NNTP-Posting-Host: dialup2.onned.gr
- X-Newsreader: Forte Free Agent 1.0.82
-
- Rob Stewart <stew@datalytics.com> wrote:
-
- >thimm@onned.gr (Herbert Thimm) wrote:
- >>Hello,
- >>I am wondering, if C++ has build in buffered output (and input).
-
- >Indeed, the iostreams library of classes do caching. When you
- >construct them, you can specify a streambuf-derived object
- >to use for the buffer. streambuf-derived classes permit
- >you to provide the buffer they should use, so you can allocate
- >whatever size buffer you need.
-
- >Do note, however, that--at least in the implementations I've
- >seen--streambuf doesn't split the buffer between input and
- >output buffering. Instead, it uses the one buffer one way or
- >the other. To get optimal buffering, you'd need to have an
- >istream-derived object and an ostream-derived object
- >separately operating on the same stream. However, you'd also
- >have to synchronize them such that changes made by the ostream
- >invalidate the affected parts of the istream buffer.
-
- Hello Rob and thanks for your answer,
- I only need iostreams to work either as istreams or as ostreams, so
- the usage of a common buffer does not seem to be a problem to me.
- Do you know how to set the buffersizes? I am working with g++ 2.6.3 and
- the documentation is not helping very much. (It says the details are
- beeing worked out). Is there a way to set the cache size w/o getting
- compiler/library dependend (that is, is the ANSI standard saying how to
- do it?)
-
- >--
- >Robert Stewart | My opinions are usually my own.
- >Datalytics, Inc.
- >(513)226-7700
- >stew@datalytics.com
-
-
-